import java.util.Scanner;

public class homework20 {
 
        public static int maxNum(int[] intArrays){
            int max = intArrays[0];//保存最大值
            for (int j = 0; j < intArrays.length; j++) {
                //依次和数组中的值判断大小来获取最大值
                if (max < intArrays[j]) {
                    max = intArrays[j];
                }
            }
            return max;
        }

        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int[] intArrays = new int[10];
            for (int i = 0; i < intArrays.length; i++) {
                System.out.printf("输入第%d个值:",i+1);
                intArrays[i] = in.nextInt();
            }
            //得到最大值
            int max =maxNum(intArrays);
            System.out.println(max);
        }
    }




